<!-- BEGIN SCRIPT layout.phtml -->
<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">

@php
$site_config=cache('site_config');
@endphp
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0">
    <meta name="referrer" content="always">
    <meta name="apple-mobile-web-app-title" content="">
    <meta name="application-name" content="">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="default">
    <meta name="msapplication-TileColor" content="#ffffff">
    <meta name="msapplication-TileImage" content="">
    <meta name="msapplication-config" content="">
    <meta name="theme-color" content="#ffffff">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <link href="{{asset('css/main.css')}}"  media="screen" rel="stylesheet" type="text/css">
    <link href='{{asset('js/humane/themes/jackedup.css')}}' rel='stylesheet'>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <meta name="description" content="{{$site_config['description']}}">
    <meta name="keywords" content="{{$site_config['keywords']}}">
    <title>{{$site_config['site_name']}}-@yield('title')</title>
    @yield('css')
    <link href="{{asset('images/favicon.ico')}}" rel="icon" type="image/png">


    <script src="{{asset('js/humane/humane.js')}}"></script>
    <script src="{{asset('js/jquery.min.js')}}"></script>
    <script src="{{asset('js/jquery.SuperSlide.js')}}"></script>

</head>

<body><div id="root">

    <div data-reactroot="">
        <div class="app-container">
            <div class="header-container" tabindex="-1">
                <header class="full-span--wborder header-main">
                    <div class="span2 span4-tablet span14-mobile header-main__logo-area">
                        <a class="header-main__logo-area__home-link" href="/"></a>
                        <button class="header-main__logo-area__menu-button">
                            <div class="burger-icon">
                                <span><i></i></span>
                                <span><i></i></span>
                                <span><i></i></span>
                            </div>
                            <div class="close-icon">
                                <span><i></i></span>
                                <span><i></i></span>
                            </div>
                        </button>
                    </div>
                    <div class="span8 span6-tablet push14-mobile header-main__search-area">{{--
                        <a class="header-main__search-area__search-icon" href="##"></a>--}}
                        <ul class="nav-list">
                            <li  class="{{active_class(if_route('index'),'nav-list-index')}}">
                                <a href="{{route('index')}}">@lang('web.index')</a>
                            </li>
                            <li class="{{active_class(if_route('photography'),'nav-list-index')}}">
                                <a href="{{route('photography')}}">@lang('web.photography')</a>
                            </li>
                            <li class="{{active_class(if_route('painting'),'nav-list-index')}}">
                                <a href="{{route('painting')}}">@lang('web.painting')</a>
                            </li>
                            <li class="{{active_class(if_route('activity_list'),'nav-list-index')}}">
                                <a href="{{route('activity_list')}}">@lang('web.activity')</a>
                            </li>
                            <li class="{{active_class(if_route('course_list'),'nav-list-index')}}">
                                <a href="{{route('course_list')}}">@lang('web.course')</a>
                            </li>
                            <li class="{{active_class(if_route('contact'),'nav-list-index')}}">
                                 <a href="{{route('contact')}}">@lang('web.contact')</a>
                            </li>
                        </ul>
                    </div>
                    <div class="span4 span4-mobile push5-mobile header-main__promo-area">
                        <div class="change-language">@if(app()->getLocale()=='Zh-cn')English @else 中文 @endif</div>
                      @guest  <ul class="login">
                            <li>
                                <a href="{{ route('login') }}">@lang('web.sign_in')</a>
                            </li>
                            <li>
                                <a href="{{ route('register') }}">@lang('web.sign_up')</a>
                            </li>
                        </ul>
                        @else
                        <ul class="login">
                            <li>
                                <a href="{{route('writing_list')}}">{{Auth::user()->name}}</a>
                            </li>
                            <li>
                                <a href="{{ route('logout') }}"
                                     onclick="event.preventDefault();
                                                     document.getElementById('logout-form').submit();">
                                    @lang('web.logout')
                                </a>

                                <form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
                                    {{ csrf_field() }}
                                </form>
                            </li>
                        </ul>
                            @endguest
                    </div>
                </header>
                <!--点击出现的部分-->
                <nav class="globalnav globalnav--hide">
                    <div class="globalnav__container">
                        <div class="globalnav-menu">
                            <div class="mainmenu-container">
                                <div class="">
                                    <div class="mainmenu__nav">
                                        <div class="push1-tablet mainmenu__nav__top">
                                            <ul class="mainmenu__nav__menu-link-list">
                                                <li class="">
                                                    <a href="{{route('index')}}">@lang('web.index')</a>
                                                </li>
                                                <li class="">
                                                    <a href="{{route('photography')}}">@lang('web.photography')</a>
                                                </li>
                                                <li class="">
                                                    <a href="{{route('painting')}}">@lang('web.painting')</a>
                                                </li>
                                                <li class="">

                                                    <a href="{{route('activity_list')}}">@lang('web.activity')</a>
                                                </li>
                                                <li class="">
                                                    <a href="{{route('course_list')}}">@lang('web.course')</a>
                                                </li>
                                                <li class="">
                                                    <a href="{{route('contact')}}">@lang('web.contact')</a>
                                                </li>
                                            </ul>
                                        </div>
                                        @if(!\Illuminate\Support\Facades\Auth::check())
                                        <!-- 登陆前的部分 -->
                                        <div class="mainmenu__nav__bottom">
                                            <div class="push1-tablet">
                                                <div class="nav-profile">
                                                    <div class="nav-submit">
                                                        <a class="button button--dark button--go" href="{{route('upload_writing')}}">@lang('web.upload_writing')</a>
                                                    </div>
                                                    <div class="profile-signup">
                                                        <div class="mainmenu__nav__bottom__desktop-signin"><button class="button button--go" onclick="javascript:location.href='{{route('login')}}'">@lang('web.sign_in')</button>
                                                            <div>
                                                                <a href="{{route('password.request')}}">@lang('web.forgot_password')</a>
                                                                <a href="{{ route('register') }}"> @lang('web.sign_up')</a>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        @else
                                        <!-- 登陆后的部分 -->
                                        <div class="mainmenu__nav__bottom span5 span10-tablet span14-mobile mainmenu__nav__bottom--fade">
                                                    <div class="push1-tablet">
                                                        <div class="nav-profile">
                                                            <div class="nav-submit"><a class="button button--dark button--go" href="{{route('upload_writing')}}">@lang('web.upload_writing')</a></div>
                                                            <div>
                                                                <div class="" style="text-align: center;">
                                                                    <div class="nav-profile__label">@lang('web.login')：
                                                                    </div>
                                                                    <a class="nav-profile__name" href="#">{{\Illuminate\Support\Facades\Auth::user()->name}}</a>
                                                                    <a class="button button--go nav-profile__button-signout" href="{{ route('logout') }}">@lang('web.logout')</a>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>

                    @endif
                </nav>
                <!--点击出现的搜索部分-->
                {{--<div class="search-page full-span--wborder">--}}
                    {{--<div class="search-page__head">Search</div>--}}
                    {{--<div class="search-page__input pixel-pattern pixel-pattern--01"><input class="" placeholder="Search for cases." type="text"></div>--}}
                    {{--<div class="search-page__result-head"></div>--}}
                    {{--<!-- react-empty: 588 -->--}}
                    {{--<!-- react-empty: 589 -->--}}
                    {{--<!-- react-empty: 590 -->--}}
                    {{--<div class="cf"></div>--}}
                {{--</div>--}}
            </div>
            @yield('content')
            <footer class="footer-container span14">
                <div class="footer-container__column footer-container__column--no-border hide-mobile span2 span3-tablet">
                    <a class="footer-container__column__logo" href="/"><img src="{{asset('images/fwa-logo.png')}}"></a>
                </div>
                <div class="footer-container__column__flex">
                    <div class="footer-container__column span10 span8-tablet span7-mobile">
                        <ul class="footer-container__menu">
                            <li class="footer-container__menu__link">
                                <a href="{{route('contact')}}">@lang('web.contact')</a>
                            </li>

                        </ul><span class="footer-container__notice hide-mobile"> </span></div>

                </div>
                <div class="footer-container__column footer-container__column--big span14 hide-tablet hide-desktop">
                    <a class="footer-container__column__logo" href="/"><img src="{{asset('images/fwa-logo.png')}}"></a><span class="footer-container__notice"></span></div>
            </footer>
        </div>
    </div>
</div>


<script src="{{asset('js/common.js')}}"></script>
<script type="text/javascript">
    var jacked = humane.create({baseCls: 'humane-jackedup', addnCls: 'humane-jackedup-error'});
    @if (count($errors) > 0)

    @foreach ($errors->all() as $error)
        jacked.log("{{$error}}")
     @endforeach
            @endif
     var jacke = humane.create({baseCls: 'humane-jackedup', addnCls: 'humane-jackedup-success'});
    @if(session('error'))
        jacked.log("{{session('error')}}")
    @endif
    @if(session('status'))

        jacke.log("{{session('status')}}");
        @endif

</script>
</body>

</html>

<!-- END layout.phtml -->
